<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .btn{
            position: fixed;
            right: 20px;
            bottom: 100px;
            background-color: #fff;

        }
        .mask{
            display: none;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background:url('img/wx.jpg') no-repeat center;
            background-color: rgba(0,0,0,.4);
        }

    </style>
</head>
<body>
    <div class="mask">

    </div>
    <div class="btn">
        显示
    </div>

    <script>

        var btn = document.getElementsByClassName('btn')[0];
        var mask = document.getElementsByClassName('mask')[0];
        btn.onclick = function(){
            mask.style.display = 'block';
            // btn.style.display = 'none';
            this.style.display = 'none';
        }

        mask.onclick = function(){
            mask.style.display = 'none';
            btn.style.display = 'block';
        }
    </script>
</body>
</html>